package com.neusoft.cmsprojects.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.neusoft.cmsprojects.dao.RoleDao;
import com.neusoft.cmsprojects.model.Role;

@Service("roleservice")
@Transactional
public class RoleServiceImpl implements RoleService {

	@Resource(name="roledao")
	private RoleDao dao;

	@Override
	public List<Object> finAll() {
		String hql="from Role";
		return dao.queryByHql(hql);
	}

	@Override
	public Role getById(Integer id) {
		
		return dao.getById(id);
	}

	@Override
	public void update(Role role) {
		dao.update(role);
	}
}
